package models.mapper;

import java.util.List;

import models.SystemOperator;
import models.SystemOperatorExample;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import vos.SystemOperatorVo;

public interface SystemOperatorMapper {
    int countByExample(SystemOperatorExample example);

    int deleteByExample(SystemOperatorExample example);

    int deleteByPrimaryKey(String operatorid);

    int insert(SystemOperator record);

    int insertSelective(SystemOperator record);

    List<SystemOperator> selectByExample(SystemOperatorExample example);

    SystemOperator selectByPrimaryKey(String operatorid);

    int updateByExampleSelective(@Param("record") SystemOperator record, @Param("example") SystemOperatorExample example);

    int updateByExample(@Param("record") SystemOperator record, @Param("example") SystemOperatorExample example);

    int updateByPrimaryKeySelective(SystemOperator record);

    int updateByPrimaryKey(SystemOperator record);
    //根据用户名查询用户列表
    List<SystemOperatorVo> findCalssByName(@Param("operatorName") String operatorName);
    /**
     * 检查用户编号是否存在
     * @param value
     * @return
     */
    @Select("select operatorid from system_operator where operatorid=#{value}")
	String checkCode(String value);
    /**
     * 获取用户密级
     * @param operatorid
     * @return
     */
    @Select("select secret.SELEV from system_operator operator"
    		+ " left join dr_secret secret on secret.id=operator.SECRET_LEVEL where operatorid=#{operatorid} ")
	long getLevelById(String operatorid);
    
}